#ifndef JSON_TYPE_DEFS_H
#define JSON_TYPE_DEFS_H
#include <iostream>
#include <string>

typedef std::wstring SimWString;
typedef std::wstring::iterator SimWStringIter;

namespace simframework
{
	namespace json
	{
		enum {
			JSON_FAIL = 0,
			JSON_SUCCESS,
			JSON_NULL
		};
		enum JSONType {
			JSON_OBJECT = 0,
			JSON_ARRAY,
			JSON_STRING,
			JSON_INTEGER,
			JSON_FLOAT,
			JSON_BOOLEAN
		};

		struct JsonAbstractNode {};
		struct JSONString : public JsonAbstractNode		{ SimWString strValue; };
		struct JSONFloat : public JsonAbstractNode		{ double fValue; };
		struct JSONInteger : public JsonAbstractNode	{ int iValue; };
		struct JSONBoolean : public JsonAbstractNode	{ bool bValue; };

		static std::wstring json_escape_quotation = L"\\\"";
		static std::wstring json_escape_backslash = L"\\\\";
		static std::wstring json_escape_slash = L"\\/";
		static std::wstring json_escape_backspace = L"\\b";
		static std::wstring json_escape_formfeed = L"\\f";
		static std::wstring json_escape_newline = L"\\n";
		static std::wstring json_escape_carriage = L"\\r";
		static std::wstring json_escape_tab = L"\\t";
		static std::wstring json_escape_hexdigits = L"\\u";
	}
}

#endif